//
//  ViewController.h
//  myhuibao
//
//  Created by lijun on 13-2-4.
//  Copyright (c) 2013年 myhuibao. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "WQTableViewController.h"
#import "LeveyPopListView.h"
#import "ASIHTTPRequest.h"
#import "ASIFormDataRequest.h"
#import "MapResultViewController.h"

@class RequestLoadingView;

@interface RestaurantSearchViewController : WQTableViewController <WQTableViewDelegate,LeveyPopListViewDelegate,MapViewControllerDidSelectDelegate>
{
    int pageIndex;
    int returnCount;
    NSMutableArray *arrayOrderBy;
    NSMutableArray *arrayMerchant;
    NSString *orderBy;
    bool isShowed;
    bool isSearchFinished;
    bool isSearchMoreFinished;
    bool isAreaFinished;
    bool isConsumeFinished;
    bool isCuisineFinished;
    int selectIndex;
    int _selectedIndex,_selectedIndex1,_selectedIndex2,_selectedIndex3;
    int _selectedTypeIndex,_selectedTypeIndex1;
    
    RequestLoadingView *loadingView;
}
@property (assign,nonatomic) int iViewMerchantType;
- (IBAction)showMap:(id)sender;
@property (strong, nonatomic) IBOutlet UITableView *mainTable;
@property (assign) int cityId;
@property (assign) int areaId;
@property (copy) NSString *keyword;
@property (copy) NSString *areaName;

@property (assign) int cuisineId;
@property (assign) int discoutId;
@property (assign) int reviewId;
@property (assign) int avgConsumeID;
@property (assign) int merchantType;
@property (assign) int _selectedIndex,_selectedIndex1,_selectedIndex2,_selectedIndex3;
@property (assign) int _selectedTypeIndex,_selectedTypeIndex1;

@property (strong,nonatomic) NSMutableArray *arrayArea;
@property (strong,nonatomic) NSMutableArray *arrayDistrict;
@property (strong,nonatomic) NSMutableArray *arrayCuisine;
@property (strong,nonatomic) NSMutableArray *arrayCuisineType;
@property (strong,nonatomic) NSMutableArray *arrayConsume;

@property (strong, nonatomic) IBOutlet UILabel *lbAddress;
@property (strong, nonatomic) IBOutlet UILabel *lbTips;
@property (strong, nonatomic) IBOutlet UILabel *lbCuisine;
@property (strong, nonatomic) IBOutlet UILabel *lbConsume;
@property (strong, nonatomic) IBOutlet UIView *ControlView;
@property (strong, nonatomic) IBOutlet UIButton *btnChoose;

@property (unsafe_unretained) ASIFormDataRequest *reqSearch;
@property (unsafe_unretained) ASIFormDataRequest *reqSearchMore;
@property (unsafe_unretained) ASIHTTPRequest *reqArea;
@property (unsafe_unretained) ASIHTTPRequest *reqConsume;
@property (unsafe_unretained) ASIHTTPRequest *reqCuisine;

- (IBAction)doBack:(id)sender;
- (IBAction)showSort:(id)sender;
- (IBAction)showArea:(id)sender;
- (IBAction)showCuisine:(id)sender;
- (IBAction)showConsume:(id)sender;
- (IBAction)OnChoose:(id)sender;

@property (strong, nonatomic) IBOutlet UILabel *edtArea;
@property (strong, nonatomic) IBOutlet UIButton *btnType;
- (IBAction)OnClickType:(id)sender;

@end
